package com.chrray.position.enums.app;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 教育状态:0-在读,1-已毕业
 */
public enum FdEduStateEnum implements BaseEnum{
    IN_SCHOOL(0, "在读"),
    GRADUATED(1, "已毕业")
    ;

    @JsonValue
    @EnumValue
    private final Integer value;
    private final String info;

    FdEduStateEnum(Integer value, String info) {
        this.info = info;
        this.value = value;
    }

    @JsonCreator
    public static FdEduStateEnum getByValue(Integer value) {
        for (FdEduStateEnum en : FdEduStateEnum.values()) {
            if (en.getValue().equals(value)) {
                return en;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getInfo() {
        return info;
    }
}
